//
//  Window.swift
//  CooperSwift
//
//  Created by 计海峰 on 2021/6/8.
//

import Foundation
import UIKit

public extension UIWindow {
    
    static func keyWindow(_ block:  @escaping (UIView) -> Void)  -> Void {
        guard let view = UIApplication.shared.keyWindow else {
            PublicMethod.delay(0.1) {
                UIWindow.keyWindow(block)
            }
            return
        }
        block(view)
    }
    
}

